@import "./base/variables.less";

.mr10 {margin-right: 10px;}
.table {
  min-width: 100%;
  margin-bottom: 0px;
}
.table-wrapper{
  flex: 1;
  /*position: absolute;
  top: 63px;
  left: 0px;
  right: 0px;
  bottom: @tableFootH;*/
  position: relative;
  margin-top: @spacing;
  padding: 0px @spacing * 2;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  .common-table-body {
    flex: 1;
    display: flex;
    justify-content: space-between;
  }
  .tree-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 260px;
    margin-right: @spacing * 2;
    border-left: 1px solid @greydd;
    border-right: 1px solid @greydd;
    .tree-search-header{
      padding: 6px 12px 12px;
      background-color: @lightGrey;
      border-bottom: 1px solid @greydd;
      .form-control {
        height: 34px;
        line-height: 34px;
        &:focus {
          border-color: lighten(@blue, 8%);
          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(85, 136, 221, 0.6)
        }
      }
      .input-group-addon {
        color: #FFF;
        background-color: @blue;
        border-color: @blue;
      }
    }
    .ztree {
      flex: 1;
    }
    .tree-footer {
      width: 100%;
      text-align: center;
      padding: 12px;
      display: flex;
      justify-content: space-between;
      border-top: 1px solid @greydd;
    }
  }
  .table-box {
    flex: 1;
    height: 100%;
    border: none;
    overflow: auto;
    table {
      tr th,tr td {
        vertical-align: middle;
        font-size: 14px;
        .icheck-icon {
          vertical-align: middle;
          padding: 0;
          margin: 0;
        }
        &.center {
          text-align: center;
          width: 52px;
        }
      }
    }
  }
  .el-table__empty-block {
    width: 100% !important;
  }
}
.functional-btn-box{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  // margin-bottom: 8px;
  .operate-btn-group {
    // flex: 1;
    + .operate-btn-group {
      margin-left: 8px;
    }
    .ake_btn {
      padding-left: 20px;
      padding-right: 20px;
      margin-bottom: 8px;
      +.ake_btn {
        margin-left: 8px;
      }
    }
  }
  .standard-btn-group{
    flex: 1;
  }
  .tree-btn-group {
    background-color: @lightGrey;
    box-shadow: inset 1px 1px 0px @greydd,
                inset -1px 1px 0px @greydd;
    .ake_btn_show_tree {
      position: relative;
      display: flex;
      // justify-content: center;
      align-items: center;
      width: 280px;
      padding-left: 4px;
      padding-right: 4px;
      span {
        flex: 1;
        display: inline-block;
        margin-left: 4px;
        margin-right: 8px;
        text-align: left;
      }
      .btn-icon {
        display: inline-block;
        width: 24px;
        height: 24px;
        line-height: 24px;
      }
    }
  }
  .table-btn-group{
    position: relative;
    margin-bottom: 8px;
    .ake_btn.ake_font_btn{font-size: 18px;}
    .table-setting-box {
      position: absolute;
      top: 34px;
      right: -16px;
      width: 280px;
      max-height: 340px;
      background-color: rgba(51,51,51,.9);
      color: #FFF;
      font-size: 13px;
      border-radius: 6px;
      transform-origin: 89% -10px;
      z-index: 2200;
      .setting-scroll-box {
        width: 100%;
        max-height: 340px;
        overflow-y: auto;
      }
      &::after {
        content: '';
        position: absolute;
        top: -10px;
        right: 22px;
        width: 0;
        height: 0;
        border: 10px solid transparent;
        border-width: 0 6px 10px;
        border-bottom-color: rgba(51,51,51,.9);
      }
      ul {
        width: 100%;
        padding: 0px 10px 0px 15px;
        -webkit-user-select: none;
        user-select: none;
        li {
          height: auto;
          line-height: 24px;
          margin-top: 12px;
          &:not(.has-second-stage) {
            height: 24px;
          }
          .second-header {
            padding-bottom: 0px;
            li {
              height: 24px;
              padding-bottom: 0px;
            }
          }
          label {
            font-weight: 700;
            cursor: pointer;
            vertical-align: bottom;
          }
          .icheck-icon {
            /*vertical-align: bottom;*/
          }
          &.not-all {
            &:last-child {
              border-bottom: 1px dashed #FFF;
            }
          }
          &:last-child {
            height: 24px + @spacing * 2;
            padding-bottom: @spacing;
          }
          &.has-second-stage {
            &:last-child {
              height: auto;
              padding-bottom: @spacing * 2;
            }
          }
        }
        + ul {
          li {
            &:last-child {
              border-bottom: 0;
              margin-bottom: 15px;
              padding-bottom: 0px;
              height: 24px;
            }
            &.has-second-stage {
              &:last-child {
                margin-bottom: 0px;
                li {
                  margin-bottom: 0px;
                }
              }
            }
          }
        }
      }
    }
  }
}

.operate-btn-box {
  display: inline-block;
  margin-left: @spacing;
  line-height: 0;
  vertical-align: bottom;
  i {
    display: inline-block;
    width: 15px;
    height: 15px;
    line-height: 12px;
    text-align: center;
    font-size: 10px;
    border: 2px solid;
    border-radius: 50%;
    margin-right: @spacing / 2;
    cursor: pointer;
  }
  .form-control {
    display: inline-block;
    width: 54px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    padding-left: @spacing / 2;
    padding-right: 0px;
  }
  .light-green {
    color: @green;
    border-color: @green;
    &:hover {
      color: darken(@green, 5%);
      border-color: darken(@green, 5%);
    }
  }
}

.table-wrapper table {
  border-left: 0;
  thead {
    th {
      // background-color: @whiteGrey;
    }
  }
  thead tr th, 
  tbody tr td {
    height: 40px;
    max-height: 40px;
    line-height: 40px;
    // background-color: @whiteGrey;
    padding: 0px @spacing * 2;
    white-space: nowrap;
    &:first-child {
      border-left: 0;
    }
    img {
      cursor: pointer;
    }
  }
  tbody tr {
    &:hover,&.active {
      td {
        // background-color: @cream;
      }
    }
    
  }
  tbody {
    tr:nth-of-type(odd) {
      td {
        // background-color: #FFF;
      }
      &:hover,&.active {
        td {
          // background-color: @cream;
        }
      }
    }
  }
}

.el-table .cell, .el-table th>div {
  padding: 0;
}
.el-table__fixed-header-wrapper thead div, .el-table__header-wrapper thead div {
  background: none;
}
.el-table__empty-text {
  font-size: 24px;
}
.el-button--small.ake_font_btn {
  font-size: 12px;
}
.table-wrapper .el-table--striped .el-table__body tr.hover-row td {
  background-color: @cream;
}
table{
  .el-button.el-button--primary {
    height: 24px;
    line-height: 24px;
    padding-top: 0px;
    padding-bottom: 0px;
  }
  .el-button, .ake_btn {
    vertical-align: middle;
  }
  .ake_btn + .ake_btn {
    margin-left: 4px;
  }
  .el-button + .el-button {
    margin-left: 4px;
  }
}
.el-table__fixed, .el-table__fixed-right {
  box-shadow: none;
}
.el-table__fixed-right {
  table{
    thead th, tbody td {
      border-left: 1px solid #DDD;
    }
  }
}
.el-table .cell {
  word-break: normal;
  white-space: nowrap;
  cursor: pointer;
}